package com.dissertation.respository;

import com.dissertation.model.Winning;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface WinningRepository extends MongoRepository<Winning, String> {

    List<Winning> findByCategoryTreeNameAndCategoryLeafNameAndDeletedIsFalse(String uniqueName, String categoryLeafName);

    List<Winning> findByCategoryTreeNameAndCategoryLeafNameAndDeletedIsFalseAndAuthor(String categoryTreeName,
                                                                        String categoryLeafName,
                                                                        String userName);
}
